package com.zhaoliangji.architecture.data.response;

/**
 * @Author: NYC
 * @CreateDate: 2021/3/16 2:26 PM
 * @Description: 基础返回数据包装
 * T:返回数据
 * mRespStatus:返回状态
 */
public class DataResult<T> {

    private T mEntity;
    private RespStatus mRespStatus;

    public DataResult(T entity, RespStatus responseStatus) {
        mEntity = entity;
        mRespStatus = responseStatus;
    }

    public T getResult() {
        return mEntity;
    }

    public RespStatus getResponseStatus() {
        return mRespStatus;
    }

    public interface Result<T> {
        void onResult(DataResult<T> dataResult);
    }
}
